home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 8: LINUX Games
/
Linux Cubed Series 8 - LINUX Games.iso
/
games
/
fortune-.tar
/
fortune-
/
fortune
/
ChangeLog
next >
Wrap
Text File
|
1995-10-20
|
8KB
|
158 lines
Late September, 1995
Too many changes to mention, really. Look at the source code for
comments on individual files. LINUX.DIF has been removed.
It is worth noting that strfile was completely broken as distributed,
and fortune had code to make it report a different file list than the
one it used to retrieve fortunes. There's some rather strong language
on the subject in strfile.c; if it offends you, tough.
Bugs were fixed, and some enhancements were added. Unstr, in
particular, has had its command line considerably enhanced. Strfile
now *really does* sort, instead of merely setting the 'sorted' flag.
Ditto for randomizing.
Noteworthy: the way to distinguish between offensive and non-offensive
files has changed for fortune. A second directory (which may be a
subdirectory of the main fortune directory; the program doesn't
add files recursively down a directory tree) has been added to
pathnames.h. Offensive files should be placed there. There is no
longer any need to add the -o suffix to file names, and the problems
with finding files (especially offensive ones) seem to have
disappeared in the process.
Currently, I'm working on breaking the fortune files themselves into
smaller, more manageable pieces, checking spelling, punctuation, and
grammar, and trying to reduce redundancy. The eventual goal, after
the files are cleaned up, is another set of files carrying HTML tags,
which would then massively simplify a CGI script that calls fortune.
New Makefiles.
A 'randstr' (I want to call it 'lottery,' but I won't) utility, which
amounts to a poor woman's stripped-down fortune, to illustrate some
other possible uses of strfile-type random-access strings files.
Amy A. Lewis alewis@email.unc.edu
Added (early October 95):
A new executable, rot, which is a rot13 filter (a caesar cipher). Most
probably have caesar, but on the other hand, if you compile this mess
as root, caesar probably isn't in the path.
A new parameter to fortune, -n, which permits you to specify the length
at which to break between long (-l) and short (-s) fortunes.
fortune -f now shows probabilities.
A bug: fortune -a nn% filename filename ... now fails without an error
message, if the filename named following the percentage exists in both
the inoffensive and the offensive directories (that is, if you have two
files containing definitions, one called fortunes/definitions and one
called fortunes/off/definitions, and call fortune as: fortune -a 10%
definitions religion politics ..., then fortune simply fails). This
appears to be an artifact of the changes that were made in storage/
naming of offensive fortunes. It only happens with the combination of
a percentage with -a and inoffensive/offensive files that share a name.
Temporary workaround: rename one or the other of the files (*sigh* I
don't like that as a solution).
The man pages have been updated. The old man pages are also available,
but are not installed unless you do it yourself (the new ones are). The
new man pages have the extension .man; the old ones have numeric
extensions.
A place has been created for fortune files containing HTML tags (the
reason I started playing with this mess was because I wanted to be
able to format fortunes nicely for the web without having to run an
enormously complex script to figure out from formatting how best to
display things, a particular problem since the formatting isn't
consistent). Tagged fortunes don't exist yet, and I'm seriously
considering creating a slightly different fortune binary that would
output the necessary headers and trailers (reducing the CGI script
to complete triviality) (-f isn't really needed for a webfortune).
Todo: I'm thinking of adding a -x to unstr, to rot13 the output. This
would have the effect of putting all the necessary tools in one package.
It further breaks compatibility with BSD tools (which has *mostly* been
maintained, merely enhanced slightly, although the change in how
offensive files are distinguished from inoffensive might be regarded as
breaking compatibility) by adding yet another parameter to unstr, which
didn't have any, before. So I haven't decided, yet.
Todo: KOI8 encoded fortunes? They couldn't be rotated without a great
deal of trouble, of course.
More minor fixes:
The way that fortune -m prints its output has been slightly changed. It
used to print the delimiter first, then, if this were the first fortune
from a particular file, it printed the name of the file in parentheses.
It now prints the first fortune without an initial delimiter; if the
fortune is the first from a particular file, it then prints
(filename), newline, delimiter, newline *to stderr*. Redirect stderr to
stdout to get something *similar to* (but not the same as) the old
behavior. The new behavior, if stderr is redirected to stdout, and
both are then redirected to a file, produces fictitious entries, one
per file in which a match was found. However, whether stderr is
redirected or not, the new format produces files that strfile can
parse without choking (the old format, since it placed the filename
on the same line as the delimiter character, effectively forced editing
of the file in order to make it usable by strfile, unless the option of
concatenating two fortunes with an ugly "% (filename)" line separating
them was considered acceptable output). Under the new display format,
if stderr is redirected into the file, you end up with filenames marking
the separation between files (as before), but they are now valid text
strings (which should probably, therefore, be deleted).
In other words, if you don't care what files the original text came from,
and want a new file containing (let us say), quotes from Mark Twain,
you might do:
fortune -am '-- Mark Twain' >twain
The files accessed would march down the screen; the fortunes would be
stored in parsable format into the file twain. If, however, you planned
to edit (perhaps to remove the quotes from the original file, you might
then wish to redirect stderr to stdout. Using bash:
fortune -am '-- Mark Twain' &>twain
or
fortune -am '-- Mark Twain' >twain 2>&1
[The above is now in the man page, more or less]
Mid-October '95
Another utility, ansify, now compiles; it has not been tested at all, so
it may not work even slightly.
Ansify is a rather stupid program, all things considered, but the work on
it does raise an interesting possibility for an enhanced fortune. At
present, the fortune databases contain x^Hy sequences for underline and
special characters (and this can be extended to include bold, = x^Hx).
Ansify is stupid because it doesn't use the proper tools, ie termcap or
terminfo (hmmm ... since it works on files, that may not be so stupid);
it appears that if that can be done, then a termcap/terminfo enhanced
fortune could be produced, which would recognize the existence of ^H in
a string and attempt to display using appropriate control sequences.
This sort of modification would be of greater interest to casual users,
I think, than even the bug fixes, and since it would not force changes
in the storage of fortunes, it is eminently portable. Consider this a
'todo' announcement.
Late October 1995
Ansify has been abandoned. I'm going to distribute this working version
of fortune, and then see how difficult it would be to add termcap/terminfo
enhancements to fortune itself--I don't anticipate serious problems, but
I'd rather go ahead and get this on the net.
A last-minute change was made to the way that percentages are displayed
with -f; it is now in the format nnn.nn%. The reason for this is that
with the multiplication of small files, fortune -af displayed a large
number of "0%"s--no worse than the old version, but not helpful.
The fortunes database was finally cleaned up, and this version is now
being distributed (at least, I hope it is). I don't consider the current
division of fortunes among files absolutely canonical; some are certainly
in the wrong places. But things are *better*.
Amy A. Lewis alewis@email.unc.edu